require 'genre.rb'

i = open('genre2.txt','r')
cname = ''
ename=''
o = open('genre3.txt','w')
while(l=i.readline)
	s=l.chop.split(':')
	if s.length==3
		o.print l
		next
	end
	cname = s[0]
	ename = s[1]
	g = genre ename
	o.print cname,':',ename,':',g.join(','),"\n"
end